home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19971216-19980424
/
000330_news@newsmaster….columbia.edu _Mon Mar 23 19:42:12 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
5KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA18558
for <kermit.misc@watsun.cc.columbia.edu>; Mon, 23 Mar 1998 19:42:12 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA04096
for kermit.misc@watsun; Mon, 23 Mar 1998 19:42:11 -0500 (EST)
Path: news.columbia.edu!panix!news.panix.com!not-for-mail
From: vilardi@panix.com (Greg Vilardi)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Help with simple script...
Date: 23 Mar 1998 19:41:35 -0500
Organization: Panix
Lines: 108
Message-ID: <6f6vfv$70c@panix3.panix.com>
References: <6f6ncm$oku@panix3.panix.com> <6f6p4r$g7o$1@apakabar.cc.columbia.edu>
NNTP-Posting-Host: panix3.panix.com
X-Newsposter: trn 4.0-test55 (26 Feb 97)
Xref: news.columbia.edu comp.protocols.kermit.misc:8528
In article <6f6p4r$g7o$1@apakabar.cc.columbia.edu>,
Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
>In article <6f6ncm$oku@panix3.panix.com>,
>Greg Vilardi <vilardi@panix.com> wrote:
>: Hi everyone. I am having a problem writing a simple kermit script to take a
>: flatfile of command records and spit them out to a remote serial device. The
>: technical details are as follows: C-Kermit v6.0.192 SCO Unix 3.2v4.2
>: connected to a CX DigiBoard. The remote system is on a dedicated line,
>: directly connected and standard RS232 connectivity is working fine.
>:
>Using what kind of flow control?
>
XON / XOFF is enabled on the ports on both ends.
>: I need to have a script that will take each line of a file, and send it out
>: the serial port. The script will then wait for a response from the port, and
>: log both the command and the response to another file. If some kind person
>: out there already has a script that does this or something very similar,
>: could you please e-mail it to me? Or could someone who knows more about
>: scripting than I do please tell me what is wrong with the script below? I've
>: spent most of the weekend with the kermit manuals and have had no luck. I
>: tried the FAQ too. Suggestions to RTFM greatfully accepted if page numbers
>: are provided. I have read chapters 17, 18 & 19 3 times already.
>: ...
>: Script starts below:
>:
>: ; Read file $1 one line at a time and send command to paging terminal on port
>: ; $3. Write return messages to $2.
>:
>: def UPDATE {
>: local \%c cmd
>: if < \v(argc) 4 end 1 Usage: UPDATE infile outfile device
>: ;set take error off
>: set carrier-watch off
>: OPEN READ \%1
>: if fail end 1 Can't open \%1 for reading.
>: open write \%2
>: if fail end 1 Can't open \%2 for writing.
>: set line \%3
>: if fail end 1 Cant open port \%3
>: set speed 9600
>:
>C-Kermit defaults to Xon/Xoff flow control. Is that what you want to
>use? If so, is the other system set up for it too?
>
Yes, see above.
>: set input silence 2
>: set input timeout-action proceed
>: set input echo off
>: define \%c 0
>: while true {
>: read cmd
>: xif fail {
>: close write
>: end 0 Commands processed: \%c.
>: }
>: increment \%c
>: ; writeln debug-log \m(cmd) \m(\%c)
>: output \m(cmd) \13\10
>: input 10 \10
>: xif fail {
>: close read
>: close write
>: end 1 Terminal did not respond.
>: }
>: writeln file \m(cmd)
>: writeln file \v(input)
>: }
>: }
>: log debug debug.log
>: update termrecs termrecs.out /dev/ttya01
>: close debug
>
>That's a very well-written script, using all the appropriate mechanisms
>and using them correctly; nothing stands out as suspect.
Thank you.
>
>So in what way does it not work? What, exactly are the symptoms?
>Do any lines get through? Do you ever get a LF back from the terminal?
>
>In other words, is it a basic connectivity problem, or a problem with
>the execution of the script?
I'm sorry I didn't describe this the first time. It seems to hang before
transmitting the first line. The take command hangs and when I hit ^C to
get the control back the system seems to flush it's buffers. My test setup
only has pins 2,3&7 (DB25) wired. I can type the same commands and see a
response, so I doubt that it is strictly an RS232 problem. I will play with the
flow control settings. I just re-tried sending a command by hand and that isn't
working at the moment either. Argh. Something must be screwy in the test bed.
I just checked the other side of the system. characters are not coming back
into kermit though they are transmitted on the other side. If you have any
other ideas, please let me know. I'll test this further tomorrow.
Thanks for the prompt and insightful reply.
-Greg
>
>- Frank
--
Greg Vilardi, Host: Scanner Cinema East E-mail:vilardi@panix.com
USnail: 354 Indian Head Rd|In-Touch Management Systems | Home:(516)864-1310
Commack, NY 11725 |Melville, NY 11747 | Work:(516)752-2701x240
.sig Version 0.50(beta release) I thought, I wrote, I posted.